<%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@page import = "com.db4o.servlet.Db4oServlet" %>
<%@page import = "facades.*" %>
<%@page import = "auser.*" %>
<%@page import = "com.db4o.query.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet"  href="<%=request.getContextPath()%>/css/printpreview.css" type="text/css" media="screen" />
<link rel="stylesheet"  href="<%=request.getContextPath()%>/css/print.css" type="text/css" media="print" />
<script src="<%=request.getContextPath()%>/js/jquery.js"></script>
<title>Stampa Elenco storico soci</title>

</head>
<body>
<% SessionFacade sfacade = new SessionFacade(session); %> 
<% Integer annoCorrente = new Integer(util.Conversions.getTodayYear());%>		
<% Query qu = sfacade.newQuery(auser.Socio.class); %>
<% Utente utente = (Utente)session.getAttribute("userBean"); %>	
<% qu.descend("circolo").constrain(utente.getCircolo());  %> 
<% qu.descend("annoUltimaTessera").constrain(annoCorrente).equal();  %> 
<% qu.descend("cognome").orderAscending().descend("nome").orderAscending();  %>		
<table>
	<thead> 
		<tr class='noprint'><th colspan="5">
				<a href='<%=request.getContextPath() %>/app/start/index.jsp'>Chiudi</a> 
				|<a href='javascript:print()'>Stampa</a> 
		<tr><th colspan="5"><div class="logo"> Elenco soci Anno <%=annoCorrente %> -  ${userBean.circolo.descrizione} </div>	
		<tr><th colspan="2" style="width:5cm">Cognome nome   
	</thead>  
	<tbody>
		<c:forEach items="<%=qu.execute()%>" var="socio" varStatus="status">
			 
			<tr><td class='ralign'>${status.count}<td>${socio.cognome} ${socio.nome}&nbsp;&nbsp; 
	  
		</c:forEach> 
	</tbody>	
</table>	
</body>	
</html>